/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package br.ufpe.cin.dmo4.middleware.message;

import br.ufpe.cin.dmo4.middleware.remotingerrors.RemotingError;

/**
 *
 * @author Danilo
 */
public class ResponseMessage extends Message{

    private int requestId;
    private int replyStatus;
    private Object body;
    private RemotingError error;

    ResponseMessage() {
    }

    public ResponseMessage(int requestId, int replyStatus, Object body) {
        super(REPLY);
        this.requestId = requestId;
        this.replyStatus = replyStatus;
        this.body = body;
    }

    public Object getBody() {
        return body;
    }

    public int getReplyStatus() {
        return replyStatus;
    }

    public int getRequestId() {
        return requestId;
    }      

    public RemotingError getError() {
        return error;
    }

    public void setError(RemotingError error) {
        this.error = error;
    }        
}
